package com.dxf.sysadmin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 角色表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("`sys-role`")
@ApiModel(value="Sys-role对象", description="角色表")
public class SysRole extends Model<SysRole> {

    private static final long serialVersionUID = 1L;

    /**
     *角色主键
     */
    @ApiModelProperty(value = "角色主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     *角色名
     */
    @ApiModelProperty(value = "角色名")
    private String name;

    /**
     *状态（0：正常 1：禁用）
     */
    @ApiModelProperty(value = "状态（0：正常 1：禁用）")
    private Integer status;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
